const mongoose = require("mongoose");
const moment = require('moment');
const Schema = mongoose.Schema;
/**
 * 区域数据
 */
const CarStation = new Schema({
    stationName: String, // 场站名称
    // stationAreaIds: Array, // 场站地区
    provinceCode: String, // 省code
    provinceName: String, // 省name
    urbanCode: String, // 场站地址
    urbanName: String, // 场站地址
    areaCode: String, // 场站地址
    areaName: String, // 场站地址
    stationAddress: String, // 场站地址
    startTime: String, // 营业时间
    endTime: String, // 营业时间
    stationCap: String, // 场站容量
    delFlag: String, // 是否启用 1是2否
    createTime: String,
    updateTime: String,
}, {
    timestamps: {
        createdAt: 'createTime',
        updatedAt: 'updateTime',
        currentTime: () => moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
    }
})

const CarStations = mongoose.model("car_stations", CarStation) // 主数据

module.exports = {
    CarStations
}